import { INCREASE, DECREASE } from '../constant/index'

export default function counterReducer(state=0, action){
    switch(action.type){
        case INCREASE:
            return state + 1
        case DECREASE:
            return state - action.value
        default:
            return state
    }
}